﻿using Xejen.Database.SqlSugar.Sqlite;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xejen.Database.SqlSugar.Sqlite.Demos
{
    /// <summary>
    /// 
    /// </summary>
    public class TestSqlSugarDbContext : SqliteDbContext
    {
        /// <inheritdoc cref="TestSqlSugarDbContext"/>
        /// <param name="connectionString">数据库连接字符串，如：Data Source=mydatabase.db</param>
        public TestSqlSugarDbContext(string connectionString) : this(new ConnectionConfig
        {
            ConnectionString = connectionString,
            DbType = DbType.Sqlite,
            IsAutoCloseConnection = true,
            InitKeyType = InitKeyType.Attribute,
        })
        {

        }

        /// <inheritdoc cref="TestSqlSugarDbContext"/>
        public TestSqlSugarDbContext(ConnectionConfig config) : base(config)
        {

        }

        /// <inheritdoc cref="TestSqlSugarDbContext"/>
        public TestSqlSugarDbContext(List<ConnectionConfig> configs) : base(configs)
        {

        }

        /// <inheritdoc cref="TestSqlSugarDbContext"/>
        public TestSqlSugarDbContext(ConnectionConfig config, Action<SqlSugarClient> configAction) : base(config, configAction)
        {

        }

        /// <inheritdoc cref="TestSqlSugarDbContext"/>
        public TestSqlSugarDbContext(List<ConnectionConfig> configs, Action<SqlSugarClient> configAction) : base(configs, configAction)
        {

        }
    }
}
